﻿using System;
using Autodesk.Revit.ApplicationServices;
using Autodesk.Revit.Attributes;
using Autodesk.Revit.DB;
using Autodesk.Revit.UI;
using HYRevitCode.ElementSearchUtility.LinkDocumentSuite;

namespace HYRevitCode.SampleAndTest
{
	[Transaction(TransactionMode.Manual)]
	[Regeneration(RegenerationOption.Manual)]
	public class CmdOfClass : IExternalCommand
	{
		public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
		{
			UIApplication application = commandData.Application;
			Application application2 = application.Application;
			FilteredElementCollectorLinkDocument filteredElementCollectorLinkDocument = new FilteredElementCollectorLinkDocument(application.ActiveUIDocument.Document);
			filteredElementCollectorLinkDocument.OfCalss(typeof(Wall));
			filteredElementCollectorLinkDocument.ToBeans();
			return Autodesk.Revit.UI.Result.Succeeded;
		}
	}
}
